package com.ruoyi.platform.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 优惠券模板对象 coupon_templates
 * 
 * @author ruoyi
 * @date 2025-10-21
 */
public class CouponTemplates extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 优惠券ID */
    @Excel(name = "优惠券ID")
    private String couponId;

    /** 优惠券名称 */
    @Excel(name = "优惠券名称")
    private String name;

    /** 类型 */
    @Excel(name = "类型")
    private Long type;

    /** 折扣/金额 */
    @Excel(name = "折扣/金额")
    private BigDecimal discountValue;

    /** 最低订单金额 */
    @Excel(name = "最低订单金额")
    private BigDecimal minOrderAmount;

    /** 最大折扣金额（折扣券时有效） */
    @Excel(name = "最大折扣金额", readConverterExp = "折=扣券时有效")
    private BigDecimal maxDiscount;

    /** 适用区域ID */
    @Excel(name = "适用区域ID")
    private String regionId;

    /** 适用商户ID */
    @Excel(name = "适用商户ID")
    private String merchantId;

    /** 总数量 */
    @Excel(name = "总数量")
    private String totalQuantity;

    /** 已使用数量 */
    @Excel(name = "已使用数量")
    private String usedQuantity;

    /** 有效期开始 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "有效期开始", width = 30, dateFormat = "yyyy-MM-dd")
    private Date validFrom;

    /** 有效期结束 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "有效期结束", width = 30, dateFormat = "yyyy-MM-dd")
    private Date validTo;

    /** 状态 */
    @Excel(name = "状态")
    private Long status;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdAt;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date updatedAt;

    /** 删除时间（软删除） */
    @Excel(name = "删除时间", readConverterExp = "软=删除")
    private Date deletedAt;

    /** 预留字段1 */
    @Excel(name = "预留字段1")
    private String externField1;

    /** 预留字段2 */
    @Excel(name = "预留字段2")
    private String externField2;

    public void setCouponId(String couponId) 
    {
        this.couponId = couponId;
    }

    public String getCouponId() 
    {
        return couponId;
    }

    public void setName(String name) 
    {
        this.name = name;
    }

    public String getName() 
    {
        return name;
    }

    public void setType(Long type) 
    {
        this.type = type;
    }

    public Long getType() 
    {
        return type;
    }

    public void setDiscountValue(BigDecimal discountValue) 
    {
        this.discountValue = discountValue;
    }

    public BigDecimal getDiscountValue() 
    {
        return discountValue;
    }

    public void setMinOrderAmount(BigDecimal minOrderAmount) 
    {
        this.minOrderAmount = minOrderAmount;
    }

    public BigDecimal getMinOrderAmount() 
    {
        return minOrderAmount;
    }

    public void setMaxDiscount(BigDecimal maxDiscount) 
    {
        this.maxDiscount = maxDiscount;
    }

    public BigDecimal getMaxDiscount() 
    {
        return maxDiscount;
    }

    public void setRegionId(String regionId) 
    {
        this.regionId = regionId;
    }

    public String getRegionId() 
    {
        return regionId;
    }

    public void setMerchantId(String merchantId) 
    {
        this.merchantId = merchantId;
    }

    public String getMerchantId() 
    {
        return merchantId;
    }

    public void setTotalQuantity(String totalQuantity) 
    {
        this.totalQuantity = totalQuantity;
    }

    public String getTotalQuantity() 
    {
        return totalQuantity;
    }

    public void setUsedQuantity(String usedQuantity) 
    {
        this.usedQuantity = usedQuantity;
    }

    public String getUsedQuantity() 
    {
        return usedQuantity;
    }

    public void setValidFrom(Date validFrom) 
    {
        this.validFrom = validFrom;
    }

    public Date getValidFrom() 
    {
        return validFrom;
    }

    public void setValidTo(Date validTo) 
    {
        this.validTo = validTo;
    }

    public Date getValidTo() 
    {
        return validTo;
    }

    public void setStatus(Long status) 
    {
        this.status = status;
    }

    public Long getStatus() 
    {
        return status;
    }

    public void setCreatedAt(Date createdAt) 
    {
        this.createdAt = createdAt;
    }

    public Date getCreatedAt() 
    {
        return createdAt;
    }

    public void setUpdatedAt(Date updatedAt) 
    {
        this.updatedAt = updatedAt;
    }

    public Date getUpdatedAt() 
    {
        return updatedAt;
    }

    public void setDeletedAt(Date deletedAt) 
    {
        this.deletedAt = deletedAt;
    }

    public Date getDeletedAt() 
    {
        return deletedAt;
    }

    public void setExternField1(String externField1) 
    {
        this.externField1 = externField1;
    }

    public String getExternField1() 
    {
        return externField1;
    }

    public void setExternField2(String externField2) 
    {
        this.externField2 = externField2;
    }

    public String getExternField2() 
    {
        return externField2;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("couponId", getCouponId())
            .append("name", getName())
            .append("type", getType())
            .append("discountValue", getDiscountValue())
            .append("minOrderAmount", getMinOrderAmount())
            .append("maxDiscount", getMaxDiscount())
            .append("regionId", getRegionId())
            .append("merchantId", getMerchantId())
            .append("totalQuantity", getTotalQuantity())
            .append("usedQuantity", getUsedQuantity())
            .append("validFrom", getValidFrom())
            .append("validTo", getValidTo())
            .append("status", getStatus())
            .append("createdAt", getCreatedAt())
            .append("updatedAt", getUpdatedAt())
            .append("deletedAt", getDeletedAt())
            .append("externField1", getExternField1())
            .append("externField2", getExternField2())
            .toString();
    }
}
